package com.jc.entity;

import java.io.Serializable;
import java.util.Objects;

/**
 * @auth luoyong
 * @Date 2021.3.19
 * @Description 用户实体类信息
 */

public class User implements Serializable {


    private String name;
    private String password;

    @java.lang.Override
    public java.lang.String toString() {
        return "user{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        if (!super.equals(object)) return false;
        User user = (User) object;
        return java.util.Objects.equals(name, user.name) && java.util.Objects.equals(password, user.password);
    }

    public int hashCode() {
        return Objects.hash(super.hashCode(), name, password);
    }


    public User(String name, String password) {
        this.name = name;
        this.password = password;
    }




}